<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<link href="../css/sys.css" type="text/css" rel="stylesheet" />
	<script src="../js/jquery-3.2.1.js"></script>
	<script>
//		$.ajax({
//			url:"referpage",
//			type:"post",
//			success:function (result) {
//				var referList = result.list;
//				var pages = result.pages;
//				var pageNum = result.pageNum;
//				var isFirstPage = result.isFirstPage;
//				var isLastPage = result.isLastPage;
//				for (var i in referList){
//					var refer = referList[i];
//					addNewTR(refer);
//				}
//				$("#pages").append("<input type='button'  id='up' value='[上一页]'>")
//
//				for (var i = 1; i < pages+1; i++) {
//					if (i == pageNum) {
//						$("#pages").append("<input type='button' id=" + i + "; class='current_page'; onclick='changePage(" + i + ")' value='[" + i + "]'>")
//					} else {
//						$("#pages").append("<input type='button' id=" + i + "; onclick='changePage(" + i + ")' value='[" + i + "]'>")
//					}
//				}
//				$("#pages").append("<input type='button'  id='down' value='[下一页]'>")
//				if (!isFirstPage) {
//					var num = pageNum - 1;
//					$("#up").attr("onclick", "changePage(" + num + ")");
//				}
//				if (!isLastPage) {
//					var num = pageNum + 1;
//					$("#down").attr("onclick", "changePage(" + num + ")");
//				}
//			}
//		})
//		function changePage(pagenum) {
//			$.ajax({
//				url: "referpage",
//				type: "post",
//				data: {
//					pageNo: pagenum,
//				},
//				success: function (result) {
//					$("#body").empty();
//					$("#pages").empty();
//					var referList = result.list;
//					var pages = result.pages;
//					var pageNum = result.pageNum;
//					var isFirstPage = result.isFirstPage;
//					var isLastPage = result.isLastPage;
//					for (var i in referList) {
//						var refer = referList[i];
//						addNewTR(refer);
//					}
//					$("#pages").append("<input type='button'  id='up' value='[上一页]'>")
//					if (!isFirstPage) {
//						var num = pageNum - 1;
//						$("#up").attr("onclick", "changePage(" + num + ")");
//					}
//					for (var i = 1; i < pages+1; i++) {
//						if (i == pageNum) {
//							$("#pages").append("<input type='button' id=" + i + "; class='current_page'; onclick='changePage(" + i + ")' value='[" + i + "]'>")
//						} else {
//							$("#pages").append("<input type='button' id=" + i + "; onclick='changePage(" + i + ")' value='[" + i + "]'>")
//						}
//					}
//					$("#pages").append("<input type='button' id='down' value='[下一页]'>")
//					if (!isLastPage) {
//						var num = pageNum + 1;
//						$("#down").attr("onclick", "changePage(" + num + ")");
//					}
//				}
//			})
//		}
//		function addNewTR(refer) {
//			$("#body").append("<tr><td align='center'>"+refer.name+"</td><td align='center'>"+refer.telephone+"</td>" +
//					"<td align='center'>"+refer.qq+"</td><td align='center'>"+refer.aClass.name+"</td>" +
//					"<td align='center'>咨询中</td><td align='center'>"+refer.staff.staffname+"</td>" +
//					"<td align='center'><a href='showRefer?id="+refer.referid+"'><img src='../images/button/view.gif' class='img'/></a></td>" +
//					"<td align='center'><a href='editRefer?referid="+refer.referid+"'><img src='../images/button/modify.gif' class='img'/></a></td>" +
//					"<td align='center'><a href='addfollowpage?referid="+refer.referid+"'><img src='../images/button/new.gif' class='img'/></a></td>" +
//					"<td align='center'><a href='addStudent?referid="+refer.referid+"'><img src='../images/button/modify.gif' class='img'/></a></td></tr>");
//		}
	</script>
</head>

<body>
 <table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="topg"></td>
  </tr>
</table>

<table border="0" cellspacing="0" cellpadding="0" class="wukuang">
  <tr>
    <td width="1%"><img src="../images/tleft.gif"/></td>
    <td width="33%" align="left">[咨询学生管理]</td>
   
    <td width="63%"align="right">
    	<%--添加咨询 --%>
    	<a class="butbg" href="../pages/refer/addRefer.jsp">
	        <img src="../images/button/tianjia.gif" />
    	</a>
    </td>
    <td width="3%" align="right"><img src="../images/tright.gif"/></td>
  </tr>
</table>

<!-- 查询条件：失去焦点马上查询 -->
<form action="" method="post">
	<table width="88%" border="0" style="margin: 20px;" >
	  <tr>
	    <td width="80px">查询条件：</td>
	    <td width="300px">
	    	<input type="text" name="condition" size="20" onblur="" />
	    	（姓名|电话|QQ）
	    </td>
	    <td ></td>
	  </tr>
	</table>
</form>

<table border="0" cellspacing="0" cellpadding="0" style="margin-top:5px;">
  <tr>
    <td ><img src="../images/result.gif"/></td>
  </tr>
</table>

<table width="100%" border="1" >
  <thead>
  <tr class="henglan" style="font-weight:bold;">
	<td width="80px" align="center">姓名</td>
	<td width="9%" align="center">电话</td>
	<td width="11%" align="center">QQ </td>
	<td width="15%" align="center">意向类别/班级</td>
	<td width="17%" align="center">状态</td>
	<td width="10%" align="center">营销人员</td>
	<td width="8%" align="center">查看</td>
	<%-- 根据状态不同显示操作项 --%>
	<td width="8%" align="center">编辑</td>
	<td width="8%" align="center">跟踪</td>
	<td width="8%" align="center">录入学籍</td>
  </tr>
  </thead>
	<tbody id="body">
	<c:forEach items="${pageInfo.list}" var="refer" varStatus="item">
	<tr>
		<td align="center">${refer.name}</td>
		<td align="center">${refer.telephone}</td>
		<td align="center">${refer.qq}</td>
		<td align="center">
			JavaEE/
			J161001期
		</td>
		<td align="center">
			咨询中
		</td>
		<td align="center">管理员</td>

		<!-- 查看 -->
		<td width="8%" align="center">
			<a href="../pages/refer/showRefer.jsp"><img src="../images/button/view.gif" class="img"/></a>
		</td>


		<!-- 编辑 -->
		<td width="8%" align="center">
			<a href="../pages/refer/editRefer.jsp"><img src="../images/button/modify.gif" class="img"/></a>
		</td>

		<!-- 添加跟踪 -->
		<td width="8%" align="center">
			<a href="../pages/follow/addOrEditFollow.jsp"><img src="../images/button/new.gif" class="img"/></a>
		</td>

		<!-- 入学 -->
		<td width="8%" align="center">
			<a href="../pages/refer/addStudent.jsp"><img src="../images/button/modify.gif" class="img"/></a>
		</td>

	</tr>
	</c:forEach>
	</tbody>
</table>
 <div id="pages" style="text-align: center">

 </div>

</body>

</html>
